package com.mapforge.map.tools.undo.tilelayeredit;

import com.mapforge.Constants;
import com.mapforge.map.TileLayer;

/**
 * 
 * @author Will Morrison
 * 
 */
public class TileLayerVisibilityEdit extends AbstractTileLayerEdit {
	/**
	 * Constructs a new layer visibility edit.
	 * @param layer layer who's visibility was edited
	 */
	public TileLayerVisibilityEdit(TileLayer layer) {
		super(Constants.LAYER_EDITED, "Layer visibility", layer);
	}

	/** */
	public void undo() {
		this.getTileLayer().setVisible(!getTileLayer().isVisible());
	}

	/** */
	public void redo() {
		this.getTileLayer().setVisible(!getTileLayer().isVisible());
	}

	/**
	 * Releases resources consumed by this edit.
	 */
	public void die() {

	}
}
